Embodiments of the present invention are directed to the computer generation of graphics images for use in the production of animated films, and more specifically, to systems and methods for reducing the computational and data storage resources used to generate such images. In some embodiments, this is accomplished by determining which input parameters for a specific software model used to generate an image are variant or invariant across an object or between frames, and then using that information to determine which calculations that are part of those models can be made once and used again later and which calculations must be re-calculated due to dependencies on changing parameters.
Rendering is the process of generating an image from a model by means of executing one or more computer programs. The model is typically a description of a three dimensional object in a strictly defined language or data structure. A typical model may contain geometry, viewpoint, texture, lighting, and shading (the color or other characteristics of the surface appearance) information about an object and the scene in which the object appears. In a simple rendering process, an element in the scene or image is modeled and then the software calculates how that element appears to a viewer (at a specified location and viewing angle) when light (typically multiple light sources) illuminates the element.
A typical rendering process uses a computer routine referred to as a shader to describe the interaction of light sources and object surfaces, and to determine certain visual characteristics of the object (e.g., color, surface roughness, etc.). A shader routine may have a set of input parameters, with some of the parameters varying over an object in a frame, and some of the parameters being invariant over the object in a given frame. Similarly, some of the input parameters may vary between frames, while others are invariant between two frames. Since a shader is one of many routines or models executed in generating a scene (i.e., it is part of a rendering pipeline) the value of its input parameters may also depend upon the output of a routine executed previously in the pipeline.
Rendering an image or frame of an animated film is a time-consuming and computationally intensive process. Significant computational resources and data storage may be required to generate each frame in an animated film. In some cases, as much as 90% of the time required for a rendering process may be attributed to shading operations and the remaining 10% to other rendering steps, e.g. hiding, displacement mapping, and the like. As a result, it is desirable to evaluate a sequence of shader computations used in generating a frame to determine if the order or manner of execution of one or more shader routines can be altered to reduce the computational resource or data storage requirements, and thereby reduce the time required to render an image. In particular, it is beneficial to identify calculations that are invariant across an object surface or between frames to reduce the resources used to render the image in a frame or between frames. As an example, this would permit some calculations to be performed once and stored for later use in other parts of the rendering process, rather than being calculated redundantly with the associated and unnecessary use of computational resources. Because a shader routine may have multiple input parameters and be part of a sequence of routines executed in the rendering pipeline, there are many possible variant and invariant parameters to consider when determining which computations are constant across an object or between frames, and which must be recalculated at different points on an object or between two different frames.
What is desired are systems and methods for evaluating the variant and invariant parameters used in shader routines that are part of the rendering pipeline in order to optimize the use of computational and data storage resources when generating computer graphics images in the production of animated films.